package 实验四;

public class Test {
	 static double LatestNationalWageTaxStandard(double money) {
	  double TaxReceivable = 0;
	  if (0 <= money && money <= 5000) {
	   TaxReceivable = 0;
	  }
	   if (5000 < money && money <= 8000) {
	    TaxReceivable = money * 0.03;
	    }
	   if (8000 < money && money <= 17000) {
	    TaxReceivable = money * 0.10;
	   }
	   if (17000 < money && money <= 30000) {
	    TaxReceivable = money * 0.20;
	   }
	   if (30000 < money && money <= 40000) {
	    TaxReceivable = money * 0.25;
	   }
	   final double TaxReceivable1 = TaxReceivable;
	   return TaxReceivable1;
	 }

	 public static void main(String[] args) {
	  // TODO Auto-generated method stub
	   String _18weekScoringList1[] = { "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优", "优" };
	   String _18weekScoringList2[] = { "及格", "及格", "及格", "及格", "及格", "及格", "优", "及格", "及格", "及格", "及格", "及格", "及格","及格", "及格", "及格", "及格", "及格" };
	   String _18weekScoringList3[] = { "优", "及格", "及格", "及格", "优", "及格", "及格", "及格", "及格", "及格", "及格", "及格", "及格","优", "及格", "及格", "及格", "及格" };
	   String _18weekScoringList4[] = { "及格", "及格", "优", "及格", "及格", "优", "及格", "及格", "优", "及格", "及格", "及格", "及格","及格", "优", "及格", "及格", "及格" };
	   String _18weekScoringList5[] = { "及格", "优", "及格", "及格", "及格", "及格", "优", "及格", "及格", "及格", "及格", "及格", "及格", "及格", "及格", "及格", "及格", "不及格" }; 
	   Laboratory ComputerNetworkLaboratory = new Laboratory(1, "计算机网络实验室", _18weekScoringList1);
	   Laboratory CompositionPrincipleLaboratory = new Laboratory(2, "组成原理实验室", _18weekScoringList2);
	   Laboratory PhysicsLaboratory = new Laboratory(3, "物理实验室", _18weekScoringList3);
	   Laboratory ChemicalLaboratory = new Laboratory(4, "化学实验室", _18weekScoringList4);
	   Laboratory BiologyLaboratory = new Laboratory(5, "生物实验室", _18weekScoringList5);
	   Laboratory moren1[] = new Laboratory[2];
	   Laboratory moren2[] = new Laboratory[3];
	   Student ZhangSan = new Student(1, "张三", moren1, 0);
	   Student LiSi = new Student(2, "李四", moren2, 0);
	   ZhangSan.setlaboratory(0, moren1, ComputerNetworkLaboratory);
	   ZhangSan.setlaboratory(1, moren1, CompositionPrincipleLaboratory);
	   LiSi.setlaboratory(0, moren2, PhysicsLaboratory);
	   LiSi.setlaboratory(1, moren2, ChemicalLaboratory);
	   LiSi.setlaboratory(2, moren2, BiologyLaboratory);
	   ZhangSan.WorkStudyIncome(ComputerNetworkLaboratory.getCleanlinessScore(), ZhangSan);
	   ZhangSan.WorkStudyIncome(CompositionPrincipleLaboratory.getCleanlinessScore(), ZhangSan);
	   LiSi.WorkStudyIncome(PhysicsLaboratory.getCleanlinessScore(), LiSi);
	   LiSi.WorkStudyIncome(ChemicalLaboratory.getCleanlinessScore(), LiSi);
	   LiSi.WorkStudyIncome(BiologyLaboratory.getCleanlinessScore(), LiSi);
	   System.out.println(ZhangSan.getmoneyEarned()); // 税收前收入
	   System.out.println(LiSi.getmoneyEarned());
	   ZhangSan.setmoneyEarned(LatestNationalWageTaxStandard(ZhangSan.getmoneyEarned()));
	   LiSi.setmoneyEarned(LatestNationalWageTaxStandard(LiSi.getmoneyEarned()));
	   System.out.println(ZhangSan.getmoneyEarned()); // 税收后收入
	   System.out.println(LiSi.getmoneyEarned());
	 }

	}